import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class BubbleSort{
    /**
     *
     * @param nums
     */
    public void bubbleSort(int []nums){
        int length = nums.length;
        if(length<=1){
            System.out.println(nums[0]);
        }
        else{
            for(int i=0;i<length;i++){
                for(int j=0;j<length-i-1;j++){
                    if (nums[j]>nums[j+1]){
                        int temp = nums[j];
                        nums[j]=nums[j+1];
                        nums[j+1]=temp;
                    }
                }
            }
            for(int i=0;i<length;i++){
                System.out.print(nums[i]);
                System.out.print(" ");
            }
            
        }
    }

    public static void main(String[] args) {
        System.out.println("Please input arry with splited by ,");
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
        String[] Arrays=str.split(",");  
        int[] nums =new int[Arrays.length];
        for(int i=0;i<nums.length;i++){
            nums[i]=Integer.parseInt(Arrays[i]); 

            }
        
        
        BubbleSort bubble=new BubbleSort();
        bubble.bubbleSort(nums);


    }
}